package csc.demo.springmvc.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class HelloWordController {
	
	@RequestMapping(value="welcome.htm")
	protected ModelAndView welcome(HttpServletRequest rq, HttpServletResponse res) throws Exception {
		ModelAndView mv = new ModelAndView("welcomePage");
		mv.addObject("welcomeMessage", "Welcome to Hello World");
		return mv;
//		String msg = "Welcome to Hello World!!!";
//		return new ModelAndView("welcomePage", "welcomeMessage", msg);
	}

}
